/*
* Copyright (C) Microsoft. All rights reserved.  
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not 
* use this file except in compliance with the License.  You may obtain a copy 
* of the License at http://www.apache.org/licenses/LICENSE-2.0  
* 
* THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
* WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
* MERCHANTABLITY OR NON-INFRINGEMENT. 
*
* See the Apache License, Version 2.0 for specific language governing 
* permissions and limitations under the License.
*
*/
#pragma once

#include <baja/common.hpp>
#include <baja/app/input.hpp>

namespace baja { namespace app {

struct iapp : public iinput_observer, public irender_observer, public isuspendable
{
    BAJA_INTERFACE(iapp, "239A1957-F476-4AFF-B914-CF8997D00667")

    virtual void initialize() = 0;
};

enum class app_bar_id
{
    none,
    normal,
    photo,
    grid,
    lasso
};

// I am only adding here the ones I need for now this is not the complete list
enum class app_bar_button_id
{
    none,
    copy_selection,
    ok_page,
    delete_page
};

struct iui_service_observer : public ibase
{
    BAJA_INTERFACE_NOTAG(iui_service_observer);

    virtual void onAppBarVisibilityChange(const bool visible) = 0;
};

struct iui_service : public ibase
{
    BAJA_INTERFACE(iui_service, "EFF60A04-2D1B-4EAC-BD75-1B5BE9412EB0")

    virtual void enableAppBarButton(const app_bar_button_id, const bool enabled) = 0;
    virtual void showAppBar(const app_bar_id id) = 0;
    virtual void hideAppBar() = 0;
    virtual void refreshAppBar() = 0;
    virtual void enableAppBar(const bool enabled) = 0;
    virtual void setText(const wchar* text, const int line = 0) = 0;
    virtual void setTextVisibility(const bool visible) = 0;
    virtual void showDialog(const wchar* text) = 0;
    virtual bool isActive() = 0;

    virtual int32 addObserver(const std::shared_ptr<iui_service_observer>& observer) = 0;
    virtual void removeObserver(const std::shared_ptr<iui_service_observer>& observer) = 0;
    virtual void removeObserver(const int32 cookie) = 0;
};

}} // namespace baja::app
